#include"abonne.h"
#include<iostream>
void Abonne::saisir()
{
cout<<"donner le nom le numero le cin le solde:";
cin>>nom>>numero>>CIN>>solde;
}
void Abonne::afficher1()

{ 
	cout<<"Nom:"<<nom<<"\n";
	cout<<"le numero:"<<numero<<endl;
	cout<<"CIN:"<<cin<<"\n";
	cout<<"le solde:"<<solde<<"\n";
	
}
void Abonne::recharger(float sold)
{ 
 solde=solde+sold;
 
}
bool Abonne::consommer(int sec,float prix)
{
float som;
som=sec*prix;
if(som>solde)
	{
	cout<<"le solde est insuffisant"<<endl;
	return false;
	}
else
	{
	solde=solde-som;
	cout<<"le nouveau solde est:"<<solde<<endl;
	return true;
	}
 }
 Abonne::Abonne()
 {nom="ben saleh";
 prenom="ali";
 numero=11;
 CIN=12364;
 solde=458;
 }
Abonne::Abonne(string n,string pren,int num,int CIN,float sold)
 {nom=n;
prenom=pren;
 numero=num;
 CIN=CIN;
 solde=sold;
 }
 
 
